﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL_Class;

namespace NLLSite.UserControl
{
    public partial class AdBannerTop : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            UIAdvertise objUIAdvertise = new UIAdvertise();
            IEnumerable<DAL_Class.Advertise> objAd = objUIAdvertise.GetBannerTop();
            
                foreach (DAL_Class.Advertise ad in objAd)
                {
                    lblBannerTop.Text = ad.Content;
                }
            
            
            if(objAd.Count() <1){
                lblBannerTop.Text = "<div style=\"width:990px; height:85px;\"></div>";
            }
            
        }
    }
}